<?php
require_once("../config.php");
page_constant("reg");


if(isset($_POST['username']))
{
	$uid=new UID();
	$data=array('id'=>'',
	'username'=>$_POST['username'],
	'password'=>md5($_POST['userpassword']),
	'email'=>$_POST['email'],
	'phone'=>$_POST['phone'],
	'realname'=>$_POST['realname'],
	'time'=>'now()');
	$uid->insert("backuser",$data);
	//$_SESSION['userid']=$dsql->
	//$_SESSION['usernmae']=$_POST['username'];
	mkdir(PICDIR.$_POST['username'],0755);
	mkdir(PICDIR.$_POST['username']."/done",0755);
	echo "ok";
	//header("location:index_user.php");
}
else
{
	$tpl->display("reg.tpl");
}




?>